package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.PubStationMapper;
import com.ruoyi.bussiness.domain.PubStation;
import com.ruoyi.bussiness.service.IPubStationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 站点Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class PubStationServiceImpl implements IPubStationService 
{
    @Autowired
    private PubStationMapper pubStationMapper;

    /**
     * 查询站点
     * 
     * @param id 站点主键
     * @return 站点
     */
    @Override
    public PubStation selectPubStationById(Long id)
    {
        return pubStationMapper.selectPubStationById(id);
    }

    /**
     * 查询站点列表
     * 
     * @param pubStation 站点
     * @return 站点
     */
    @Override
    public List<PubStation> selectPubStationList(PubStation pubStation)
    {
        return pubStationMapper.selectPubStationList(pubStation);
    }

    /**
     * 新增站点
     * 
     * @param pubStation 站点
     * @return 结果
     */
    @Override
    public int insertPubStation(PubStation pubStation)
    {
        return pubStationMapper.insertPubStation(pubStation);
    }

    /**
     * 修改站点
     * 
     * @param pubStation 站点
     * @return 结果
     */
    @Override
    public int updatePubStation(PubStation pubStation)
    {
        return pubStationMapper.updatePubStation(pubStation);
    }

    /**
     * 批量删除站点
     * 
     * @param ids 需要删除的站点主键
     * @return 结果
     */
    @Override
    public int deletePubStationByIds(String ids)
    {
        return pubStationMapper.deletePubStationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除站点信息
     * 
     * @param id 站点主键
     * @return 结果
     */
    @Override
    public int deletePubStationById(Long id)
    {
        return pubStationMapper.deletePubStationById(id);
    }
}
